ASM		= nasm
ASMFLAGS	= -f elf

CFLAGS		= -I../include -g -fno-stack-protector

SOURCES		= $(wildcard *.c *.asm)
OBJS		= $(patsubst %.c,%.o,$(patsubst %.asm,%.o,$(SOURCES)))

TARGET		= $(OBJS)

lib : $(TARGET)

%.o : %.asm
	$(ASM) $(ASMFLAGS) -o $@ $<

clean :
	rm -f $(OBJS) depends

depends : $(SOURCES)
	$(CC) -M $(CFLAGS) *.c > depends

include depends
